libxl: check nesthvm and altp2m in libxl
authorWei Liu <wei.liu2@citrix.com>
Mon, 27 Jul 2015 14:01:32 +0000 (15:01 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 28 Jul 2015 10:04:12 +0000 (11:04 +0100)
commitb9041b4eeb792fa0ef42828d2d49c22484f2e363
treed8d57cfd3dc1577bcc82224b884dbb7f28caf8b5
parent8398ec706ff60e17a5044470fa2e90a1b081f37a
libxl: check nesthvm and altp2m in libxl

In ea214001 ("x86/altp2m: add altp2mhvm HVM domain parameter"), a
check was added to ensure nestedhvm and altp2m cannot be enabled at
the same time. That check was added in xl, but in fact it should be in
libxl because it should be the entity that decides whether
the provided configuration is valid.

This patch moves the check to libxl. The code snippet is moved after
calling libxl__domain_build_info_setdefault so that we can:
1. remove libxl_defbool_is_default in `if()';
2. detect mistake in libxl__domain_build_info_setdefault.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/libxl_create.c
tools/libxl/xl_cmdimpl.c